<?php
/**
/**
*  Project Name: 芝士活动
*  搜索引擎接口配置
*  @package:   config
*  @author:    邝达峰
*  @date 2017年07月18日
*/

/**搜索引擎配置*/
$arrSearchIp = array('192.168.1.75:6667','192.168.1.75:6667','192.168.1.75:8080','192.168.1.75:8080');//搜索引擎接口ip地址与端口
//配置
$arrConfig = array();
//搜索引擎蜘蛛爬行名
$arrConfig['robots'] = array('Yodao','Google','Yahoo','Baidu','msn','sogou','qq','archive','Taobao','bot','Spider');
$arrConfig['search_ip'] = $arrSearchIp;
$arrConfig['search_api_debug'] = true;//是不是打开搜索引擎调试模式
 //懒汉搜索源对应ip
$arrConfig['search_query_source_ip']['default']  =  $arrSearchIp[0];
$arrConfig['search_query_source_ip']['product']  =  $arrSearchIp[0];
$arrConfig['search_query_source_ip']['company']    = $arrSearchIp[1];
//solr搜索对应ip
$arrConfig['search_solr_source_ip']['default']  =  $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['product']  =  $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['company']    = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['keywords_product']    = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['product_sort'] = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['jobs'] = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['tuoo_images'] = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['demand'] = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['baike'] = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['news'] = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['promo'] = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['qs'] = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['zhaoshang'] = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['brand'] = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['serve'] = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['company_sys']    = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['stat_keyword_channel']    = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['needs']    = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['users']    = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['invite']    = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['dage_question']    = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['meinfo']    = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['wisdom']    = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['category']    = $arrSearchIp[2];
$arrConfig['search_solr_source_ip']['adinfo']    = $arrSearchIp[2];
//搜索引擎业务对应的搜索库
$arrConfig['search_business']['product'] = 'isr_product_shard2_replica1';
$arrConfig['search_business']['company'] = 'isr_company_shard2_replica1';
$arrConfig['search_business']['company_sys'] = 'isr_company_sys';
$arrConfig['search_business']['keywords_product'] = 'isr_keywords_shard3_replica1';
$arrConfig['search_business']['product_sort'] = 'isr_productsort';
$arrConfig['search_business']['jobs'] = 'isr_jobs_shard2_replica1';
$arrConfig['search_business']['tuoo_images'] = 'isr_tuoo_shard1_replica1';
$arrConfig['search_business']['brand'] = 'isr_brandprotect';
$arrConfig['search_business']['demand'] = 'isr_demand_shard3_replica1';
$arrConfig['search_business']['baike'] = 'isr_baike_shard3_replica1';
$arrConfig['search_business']['news'] = 'isr_news_shard2_replica1';
$arrConfig['search_business']['promo'] = 'isr_promo_shard3_replica1';
$arrConfig['search_business']['qs'] = 'isr_qs_shard3_replica1';
$arrConfig['search_business']['zhaoshang'] = 'isr_zhaoshang_shard1_replica1';
$arrConfig['search_business']['serve'] = 'isr_serve_shard3_replica1';
$arrConfig['search_business']['stat_keyword_channel'] = 'isr_kw_channel';
$arrConfig['search_business']['needs'] = 'isr_needs';
$arrConfig['search_business']['users'] = 'isr_users';
$arrConfig['search_business']['invite'] = 'isr_invite';
$arrConfig['search_business']['dage_question'] = 'isr_dage_question';
$arrConfig['search_business']['meinfo'] = 'isr_meinfo';
$arrConfig['search_business']['wisdom'] = 'isr_wisdom';
$arrConfig['search_business']['category'] = 'isr_category';
$arrConfig['search_business']['adinfo'] = 'isr_adinfo';
//设置网站信息审核类型正在使用搜索
$arrConfig['search_business']['solr_using'] = array('corp_product','company','keywords_product','corp_product_sort','corp_job','tuoo_images','corp_brand_protect','corp_demand',
                                               'corp_baike','corp_news','corp_promo','corp_quality_suppliers','corp_zhaoshang','company_serve','corp_serve','company_modify_apply',
                                               'corp_needs','corp_invite','cf_project','corp_wisdom','category_info','ad_enjoyTheWorld'
                                               );
//搜索排騟dismax设置
$arrConfig['search_boost_rule']['company'] = array('pf'=>'corpName,productName',
                                                'qf'=>'corpName^3.2 productName^3.8',
                                                'bf'=>'sum(linear(isqs,100,0),linear(ismb,200,0),map(isru,0,0,-150))',
                                                'defType'=>'edismax',
                                                'q.op'=>'AND'
                                                );
                                                
$arrConfig['search_boost_rule']['product'] = array('pf'=>'productName,corpName',
                                                'qf'=>'productName^3 corpName^1.5',
                                                'bf'=>'sum(linear(isqs,100,0),linear(ismb,400,0),map(isru,0,0,-300),map(ranks,252,352,sub(ranks,100),1),map(ranks,0,232,-150,1))',
                                                'defType'=>'edismax',
                                                'q.op'=>'AND'
                                                );  

$arrConfig['search_boost_rule']['serve'] = array('pf'=>'serveName,corpName',
                                                'qf'=>'serveName^3 corpName^1.5',
                                                'bf'=>'sum(linear(isqs,100,0),linear(ismb,200,0))',
                                                'defType'=>'edismax',
                                                'q.op'=>'AND'
                                                );  
                                                
$arrConfig['search_boost_rule']['stat_keyword_channel'] = array('pf'=>'keyword',
                                                'qf'=>'keyword^1',
                                                'bf'=>'sum(linear(search_num,15,0))',
                                                'defType'=>'edismax'
                                                );                                                  
//搜索引擎分词服务器配置  
$arrSearchAnalysisIp = array('192.168.1.75:8080','192.168.1.75:8080');//搜索引擎接口分词服务器IP
$arrSearchAnalysisBusiness = array('promo','qs');//搜索引擎接口分词库业务                        
$arrConfig['search_analysis']['host'] = $arrSearchAnalysisIp;
$arrConfig['search_analysis']['business'] = $arrSearchAnalysisBusiness;    

return $arrConfig;


?>
